/* 
 * File:   symboltableelementtype.h
 * Author: Kamil Chaber
 *
 * Created on 6 stycznia 2015, 21:07
 */

#ifndef SYMBOLTABLEELEMENTTYPE_H
#define	SYMBOLTABLEELEMENTTYPE_H

#include <string>

using namespace std;

enum SymbolTableElementType {
    RECORD_TYPE_NOT_SET,
    RECORD_TYPE_PROGRAM,
    RECORD_TYPE_PROGRAM_VAR,
    RECORD_TYPE_VARIABLE,
    RECORD_TYPE_TEMP_VARIABLE,
    RECORD_TYPE_INT_NUMBER,
    RECORD_TYPE_REAL_NUMBER,
    RECORD_RESERVED
};

static const char * SymbolTableElementTypeStrings[] = {
    "", 
    "PROGRAM ID", 
    "PROGRAM PARAM",
    "VARIABLE",
    "TEMPORARY VARIABLE",
    "INT NUMBER",
    "REAL NUMBER",
    "RESERVED IDENTIFIER"
};

enum VariableValueType {
    VAR_VALUE_TYPE_INTEGER,
    VAR_VALUE_TYPE_REAL
};

static const char * VariableValueTypeStrings[] = {
    "INT", 
    "REAL"
};

enum ArithmeticOperationType {
    ARITHMETIC_OP_ADDITION,
    ARITHMETIC_OP_SUBTRACTION,
    ARITHMETIC_OP_MULTIPLICATION,
    ARITHMETIC_OP_DIVISION
};

static const int INT_MEMORY_SIZE = 4;
static const int REAL_MEMORY_SIZE = 8;
static const int EMPTY_INT_VALUE = -1;
static const string TEMP_VARIABLE_PREFIX = "$t";

#endif	/* SYMBOLTABLEELEMENTTYPE_H */

